home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / workbook / form1.frm (.txt) next >
Encoding:
Visual Basic Form  |  1998-12-15  |  4.8 KB  |  158 lines

  1. VERSION 5.00
  2. Object = "{24FA68C7-9436-11D2-A5CA-C740103BFF31}#1.0#0"; "WorkBookOCX.ocx"
  3. Begin VB.Form Form1 
  4.    Caption         =   "Form1"
  5.    ClientHeight    =   4650
  6.    ClientLeft      =   90
  7.    ClientTop       =   375
  8.    ClientWidth     =   6810
  9.    LinkTopic       =   "Form1"
  10.    MDIChild        =   -1  'True
  11.    ScaleHeight     =   4650
  12.    ScaleWidth      =   6810
  13.    Begin VB.PictureBox pic_Main 
  14.       Height          =   4335
  15.       Left            =   0
  16.       ScaleHeight     =   4275
  17.       ScaleWidth      =   6675
  18.       TabIndex        =   0
  19.       Top             =   120
  20.       Width           =   6735
  21.       Begin VB.TextBox Text1 
  22.          Height          =   1575
  23.          Index           =   5
  24.          Left            =   0
  25.          MultiLine       =   -1  'True
  26.          ScrollBars      =   2  'Vertical
  27.          TabIndex        =   7
  28.          Text            =   "Form1.frx":0000
  29.          Top             =   0
  30.          Width           =   3735
  31.       End
  32.       Begin VB.TextBox Text1 
  33.          Height          =   1575
  34.          Index           =   4
  35.          Left            =   0
  36.          MultiLine       =   -1  'True
  37.          ScrollBars      =   2  'Vertical
  38.          TabIndex        =   6
  39.          Text            =   "Form1.frx":0006
  40.          Top             =   0
  41.          Width           =   3735
  42.       End
  43.       Begin VB.TextBox Text1 
  44.          Height          =   1575
  45.          Index           =   3
  46.          Left            =   0
  47.          MultiLine       =   -1  'True
  48.          ScrollBars      =   2  'Vertical
  49.          TabIndex        =   5
  50.          Text            =   "Form1.frx":000C
  51.          Top             =   0
  52.          Width           =   3735
  53.       End
  54.       Begin VB.TextBox Text1 
  55.          Height          =   1575
  56.          Index           =   2
  57.          Left            =   0
  58.          MultiLine       =   -1  'True
  59.          ScrollBars      =   2  'Vertical
  60.          TabIndex        =   4
  61.          Text            =   "Form1.frx":0012
  62.          Top             =   0
  63.          Width           =   3735
  64.       End
  65.       Begin VB.TextBox Text1 
  66.          Height          =   1575
  67.          Index           =   1
  68.          Left            =   0
  69.          MultiLine       =   -1  'True
  70.          ScrollBars      =   2  'Vertical
  71.          TabIndex        =   3
  72.          Text            =   "Form1.frx":0018
  73.          Top             =   0
  74.          Width           =   3735
  75.       End
  76.       Begin VB.TextBox Text1 
  77.          Height          =   1575
  78.          Index           =   0
  79.          Left            =   120
  80.          MultiLine       =   -1  'True
  81.          ScrollBars      =   2  'Vertical
  82.          TabIndex        =   2
  83.          Text            =   "Form1.frx":001E
  84.          Top             =   120
  85.          Width           =   3735
  86.       End
  87.       Begin WorkBookOCX.WorkBook WorkBook1 
  88.          Height          =   330
  89.          Left            =   960
  90.          TabIndex        =   1
  91.          Top             =   3480
  92.          Width           =   5415
  93.          _ExtentX        =   9551
  94.          _ExtentY        =   582
  95.          BeginProperty WorkSheetFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  96.             Name            =   "Tahoma"
  97.             Size            =   8.25
  98.             Charset         =   0
  99.             Weight          =   400
  100.             Underline       =   0   'False
  101.             Italic          =   0   'False
  102.             Strikethrough   =   0   'False
  103.          EndProperty
  104.          WorkSheetCount  =   6
  105.       End
  106.    End
  107. Attribute VB_Name = "Form1"
  108. Attribute VB_GlobalNameSpace = False
  109. Attribute VB_Creatable = False
  110. Attribute VB_PredeclaredId = True
  111. Attribute VB_Exposed = False
  112. Option Explicit
  113. Private Sub Form_Load()
  114. Form_Resize
  115. End Sub
  116. Private Sub Form_Resize()
  117. On Error Resume Next
  118. With pic_Main
  119. .Left = ScaleLeft
  120. .Width = ScaleWidth
  121. .Top = ScaleTop
  122. .Height = ScaleHeight
  123. .Visible = True
  124. End With
  125. If WindowState = 0 Then
  126. pic_Main.BorderStyle = 1
  127. pic_Main.BorderStyle = 0
  128. End If
  129. End Sub
  130. Private Sub pic_Main_Resize()
  131. On Error Resume Next
  132. With WorkBook1
  133. .Top = pic_Main.ScaleHeight - WorkBook1.Height
  134. .Left = pic_Main.ScaleLeft
  135. .Width = pic_Main.ScaleWidth
  136. End With
  137. Dim i As Integer
  138. For i = 0 To Text1.Count - 1
  139. With Text1(i)
  140. .Font.Name = "Tahoma"
  141. .BorderStyle = 0
  142. .Left = pic_Main.ScaleLeft
  143. .Width = pic_Main.ScaleWidth
  144. .Top = pic_Main.ScaleTop
  145. .Height = pic_Main.ScaleHeight - WorkBook1.Height
  146. .Text = .Name & "(" & .Index & ")"
  147. End With
  148. Text1(WorkBook1.ActiveWorkSheet - 1).Visible = True
  149. Text1(WorkBook1.ActiveWorkSheet - 1).ZOrder 0
  150. End Sub
  151. Private Sub WorkBook1_SheetSwitch(ByVal nIndex As Double)
  152. Text1(WorkBook1.ActiveWorkSheet - 1).Visible = True
  153. Text1(WorkBook1.ActiveWorkSheet - 1).ZOrder 0
  154. Text1(nIndex - 1).Visible = True
  155. Text1(nIndex - 1).ZOrder 0
  156. Text1(nIndex - 1).SetFocus
  157. End Sub
  158.